package com.flying;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class Main {

    public static void main(String[] args) {
        while (true){
            System.out.println("begin");
            int a = 1;
            int b = 2;
            int c = a+b;
            System.out.println("c="+c);

            JSONObject jsonObject = new JSONObject();
            jsonObject.put("name","张三");
            jsonObject.put("age",10);
            Person person = JSON.parseObject(JSON.toJSONString(jsonObject),Person.class);
            String name = person.getName();
            int age = person.getAge();
            System.out.println("name:"+name+",age:"+age);
            System.out.println("end");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
